<!DOCTYPE html>
<html>

<head>

<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
<title>zhihu v1</title>


<style type="text/css">
*{margin:0;padding:0;}
body {
	font:13.34px helvetica,arial,freesans,clean,sans-serif;
	color:black;
	line-height:1.4em;
	background-color: #F8F8F8;
	padding: 0.7em;
}
p {
	margin:1em 0;
	line-height:1.5em;
}
table {
	font-size:inherit;
	font:100%;
	margin:1em;
}
table th{border-bottom:1px solid #bbb;padding:.2em 1em;}
table td{border-bottom:1px solid #ddd;padding:.2em 1em;}
input[type=text],input[type=password],input[type=image],textarea{font:99% helvetica,arial,freesans,sans-serif;}
select,option{padding:0 .25em;}
optgroup{margin-top:.5em;}
pre,code{font:12px Monaco,"Courier New","DejaVu Sans Mono","Bitstream Vera Sans Mono",monospace;}
pre {
	margin:1em 0;
	font-size:12px;
	background-color:#eee;
	border:1px solid #ddd;
	padding:5px;
	line-height:1.5em;
	color:#444;
	overflow:auto;
	-webkit-box-shadow:rgba(0,0,0,0.07) 0 1px 2px inset;
	-webkit-border-radius:3px;
	-moz-border-radius:3px;border-radius:3px;
}
pre code {
	padding:0;
	font-size:12px;
	background-color:#eee;
	border:none;
}
code {
	font-size:12px;
	background-color:#f8f8ff;
	color:#444;
	padding:0 .2em;
	border:1px solid #dedede;
}
img{border:0;max-width:100%;}
abbr{border-bottom:none;}
a{color:#4183c4;text-decoration:none;}
a:hover{text-decoration:underline;}
a code,a:link code,a:visited code{color:#4183c4;}
h2,h3{margin:1em 0;}
h1,h2,h3,h4,h5,h6{border:0;}
h1{font-size:170%;border-top:4px solid #aaa;padding-top:.5em;margin-top:1.5em;}
h1:first-child{margin-top:0;padding-top:.25em;border-top:none;}
h2{font-size:150%;margin-top:1.5em;border-top:4px solid #e0e0e0;padding-top:.5em;}
h3{margin-top:1em;}
hr{border:1px solid #ddd;}
ul{margin:1em 0 1em 2em;}
ol{margin:1em 0 1em 2em;}
ul li,ol li{margin-top:.5em;margin-bottom:.5em;}
ul ul,ul ol,ol ol,ol ul{margin-top:0;margin-bottom:0;}
blockquote{margin:1em 0;border-left:5px solid #ddd;padding-left:.6em;color:#555;}
dt{font-weight:bold;margin-left:1em;}
dd{margin-left:2em;margin-bottom:1em;}
sup {
    font-size: 0.83em;
    vertical-align: super;
    line-height: 0;
}
kbd {
  display: inline-block;padding: 3px 5px;font-size: 11px;line-height: 10px;color: #555;vertical-align: middle;background-color: #fcfcfc;border: solid 1px #ccc;border-bottom-color: #bbb;border-radius: 3px;box-shadow: inset 0 -1px 0 #bbb;
}
* {
	-webkit-print-color-adjust: exact;
}
@media screen and (min-width: 914px) {
    body {
        width: 854px;
        margin:0 auto;
    }
}
@media print {
	table, pre {
		page-break-inside: avoid;
	}
	pre {
		word-wrap: break-word;
	}
}
</style>

<style type="text/css">
/**
 * prism.js default theme for JavaScript, CSS and HTML
 * Based on dabblet (http://dabblet.com)
 * @author Lea Verou
 */

code[class*="language-"],
pre[class*="language-"] {
	color: black;
	background: none;
	text-shadow: 0 1px white;
	font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;
	text-align: left;
	white-space: pre;
	word-spacing: normal;
	word-break: normal;
	word-wrap: normal;
	line-height: 1.5;

	-moz-tab-size: 4;
	-o-tab-size: 4;
	tab-size: 4;

	-webkit-hyphens: none;
	-moz-hyphens: none;
	-ms-hyphens: none;
	hyphens: none;
}

pre[class*="language-"]::-moz-selection, pre[class*="language-"] ::-moz-selection,
code[class*="language-"]::-moz-selection, code[class*="language-"] ::-moz-selection {
	text-shadow: none;
	background: #b3d4fc;
}

pre[class*="language-"]::selection, pre[class*="language-"] ::selection,
code[class*="language-"]::selection, code[class*="language-"] ::selection {
	text-shadow: none;
	background: #b3d4fc;
}

@media print {
	code[class*="language-"],
	pre[class*="language-"] {
		text-shadow: none;
	}
}

/* Code blocks */
pre[class*="language-"] {
	padding: 1em;
	margin: .5em 0;
	overflow: auto;
}

:not(pre) > code[class*="language-"],
pre[class*="language-"] {
	background: #f5f2f0;
}

/* Inline code */
:not(pre) > code[class*="language-"] {
	padding: .1em;
	border-radius: .3em;
	white-space: normal;
}

.token.comment,
.token.prolog,
.token.doctype,
.token.cdata {
	color: slategray;
}

.token.punctuation {
	color: #999;
}

.namespace {
	opacity: .7;
}

.token.property,
.token.tag,
.token.boolean,
.token.number,
.token.constant,
.token.symbol,
.token.deleted {
	color: #905;
}

.token.selector,
.token.attr-name,
.token.string,
.token.char,
.token.builtin,
.token.inserted {
	color: #690;
}

.token.operator,
.token.entity,
.token.url,
.language-css .token.string,
.style .token.string {
	color: #a67f59;
	background: hsla(0, 0%, 100%, .5);
}

.token.atrule,
.token.attr-value,
.token.keyword {
	color: #07a;
}

.token.function {
	color: #DD4A68;
}

.token.regex,
.token.important,
.token.variable {
	color: #e90;
}

.token.important,
.token.bold {
	font-weight: bold;
}
.token.italic {
	font-style: italic;
}

.token.entity {
	cursor: help;
}
</style>


</head>

<body>

<p>参考代码：<a href="http://git.oschina.net/crossin/crawler/blob/master/ex3_zhihu_v1.py" target="_blank">http://git.oschina.net/crossin/crawler/blob/master/ex3_zhihu_v1.py</a></p>

<h2 id="toc_0">1. 知乎关注页面</h2>

<p>抓取目标页面：</p>

<p><a href="https://www.zhihu.com/people/crossin/following" target="_blank">https://www.zhihu.com/people/crossin/following</a></p>

<p><img src="http://git.oschina.net/crossin/crawler/raw/master/stuff/zhihu.png" style="width:100%" alt="知乎关注"></p>

<h2 id="toc_1">2. AJAX</h2>

<p>AJAX 即 “Asynchronous Javascript And XML”（异步JavaScript和XML），是一种在无需重新加载整个网页的情况下，能够更新部分网页的技术。</p>

<p>传统的网页（不使用 AJAX）如果需要更新内容，必需重载整个网页面。而 AJAX 使用 JavaScript 向服务器发出请求并处理响应，不用刷新页面。</p>

<h3 id="toc_2">示例</h3>

<p>在下面的 HTML 代码中，<code>&lt;div&gt;</code> 部分用于显示来自服务器的信息。当按钮（button）被点击时，将调用名为 <code>loadXMLDoc()</code> 的函数：</p>

<div><pre><code class="language-markup">&lt;html&gt;
&lt;body&gt;

&lt;div id=&quot;myDiv&quot;&gt;&lt;h3&gt;Let AJAX change this text&lt;/h3&gt;&lt;/div&gt;
&lt;button type=&quot;button&quot; onclick=&quot;loadXMLDoc()&quot;&gt;Change Content&lt;/button&gt;

&lt;/body&gt;
&lt;/html&gt;</code></pre></div>

<p>接下来，在页面的 head 部分添加一个 <code>&lt;script&gt;</code> 标签。该标签中包含了这个 <code>loadXMLDoc()</code> 函数：</p>

<div><pre><code class="language-markup">&lt;head&gt;
&lt;script type=&quot;text/javascript&quot;&gt;
function loadXMLDoc()
{
  xmlhttp=new XMLHttpRequest();
  xmlhttp.onreadystatechange=function()
  {
    if (xmlhttp.readyState==4 &amp;&amp; xmlhttp.status==200)
    {
      document.getElementById(&quot;myDiv&quot;).innerHTML=xmlhttp.responseText;
    }
  }
  xmlhttp.open(&quot;GET&quot;, &quot;test1.txt&quot;, true);
  xmlhttp.send();
}
&lt;/script&gt;
&lt;/head&gt;</code></pre></div>

<p><code>loadXMLDoc()</code> 函数里创建了一个 <code>XMLHttpRequest</code> 对象，这是 AJAX 的基础，用于在后台与服务器交换数据。</p>

<p><code>onreadystatechange</code> 定义了接收到请求响应后的处理函数，更改 div 的显示内容。</p>

<p><code>open()</code> 和 <code>send()</code> 方法创建并发送了请求。</p>

<h3 id="toc_3">参考资料</h3>

<ol>
<li><a href="http://www.w3school.com.cn/ajax/" target="_blank">AJAX 教程 - w3school</a></li>
<li><a href="http://www.runoob.com/ajax/ajax-tutorial.html" target="_blank">AJAX 教程 - 菜鸟教程</a></li>
</ol>

<h2 id="toc_4">3. JSON</h2>

<p>JSON（JavaScript Object Notation）是一种轻量级的文本数据交换格式，与编程语言无关。它易于人阅读和编写，同时也易于机器解析和生成，能有效地提升网络传输效率。</p>

<p>在很多网站的 AJAX 请求中，普遍使用 JSON 作为传输数据的格式。</p>

<h3 id="toc_5">语法规则</h3>

<ul>
<li>数据在 <strong>名称 / 值</strong> 对中</li>
<li>数据由 <strong>逗号</strong> 分隔</li>
<li><strong>花括号</strong> 保存对象</li>
<li><strong>方括号</strong> 保存数组</li>
</ul>

<h3 id="toc_6">示例</h3>

<div><pre><code class="language-none">{
  &quot;employees&quot;: [
    { &quot;firstName&quot;:&quot;Bill&quot; , &quot;lastName&quot;:&quot;Gates&quot; },
    { &quot;firstName&quot;:&quot;George&quot; , &quot;lastName&quot;:&quot;Bush&quot; },
    { &quot;firstName&quot;:&quot;Thomas&quot; , &quot;lastName&quot;:&quot;Carter&quot; }
  ]
}</code></pre></div>

<h3 id="toc_7">参考资料</h3>

<ol>
<li><a href="http://www.w3school.com.cn/json/index.asp" target="_blank">JSON 教程 - w3school</a></li>
<li><a href="http://www.runoob.com/json/json-tutorial.html" target="_blank">JSON 教程 - 菜鸟教程</a></li>
<li><a href="http://www.json.cn/" target="_blank">JSON 在线解析及格式化验证</a></li>
<li><a href="https://github.com/callumlocke/json-formatter" target="_blank">JSON Formatter（chrome 插件）</a></li>
</ol>

<h2 id="toc_8">4. HTTP headers</h2>

<p>HTTP headers，即为 HTTP 请求的头信息，它提供了关于请求，响应或者其他的发送实体的信息，是网络请求的重要组成部分。</p>

<p><img src="http://git.oschina.net/crossin/crawler/raw/master/stuff/headers.png" style="width:100%" alt="HTTP 请求示意图"></p>

<h3 id="toc_9">常见信息</h3>

<table>
<thead>
<tr>
<th style="text-align: center">响应头</th>
<th style="text-align: left">说明</th>
<th style="text-align: left">示例</th>
</tr>
</thead>

<tbody>
<tr>
<td style="text-align: center">Accept</td>
<td style="text-align: left">指定客户端能够接收的内容类型</td>
<td style="text-align: left">Accept: text/plain, text/html</td>
</tr>
<tr>
<td style="text-align: center">Accept-Charset</td>
<td style="text-align: left">浏览器可以接受的字符编码集。</td>
<td style="text-align: left">Accept-Charset: iso-8859-5</td>
</tr>
<tr>
<td style="text-align: center">Accept-Encoding</td>
<td style="text-align: left">指定浏览器可以支持的web服务器返回内容压缩编码类型。</td>
<td style="text-align: left">Accept-Encoding: compress, gzip</td>
</tr>
<tr>
<td style="text-align: center">Accept-Language</td>
<td style="text-align: left">浏览器可接受的语言</td>
<td style="text-align: left">Accept-Language: en,zh</td>
</tr>
<tr>
<td style="text-align: center">Authorization</td>
<td style="text-align: left">HTTP授权的授权证书</td>
<td style="text-align: left">Authorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==</td>
</tr>
<tr>
<td style="text-align: center">Cookie</td>
<td style="text-align: left">HTTP请求发送时，会把保存在该请求域名下的所有cookie值一起发送给web服务器。</td>
<td style="text-align: left">Cookie: $Version=1; Skin=new;</td>
</tr>
<tr>
<td style="text-align: center">Content-Length</td>
<td style="text-align: left">请求的内容长度</td>
<td style="text-align: left">Content-Length: 348</td>
</tr>
<tr>
<td style="text-align: center">Content-Type</td>
<td style="text-align: left">请求的与实体对应的MIME信息</td>
<td style="text-align: left">Content-Type: application/x-www-form-urlencoded</td>
</tr>
<tr>
<td style="text-align: center">Host</td>
<td style="text-align: left">指定请求的服务器的域名和端口号</td>
<td style="text-align: left">Host: www.zcmhi.com</td>
</tr>
<tr>
<td style="text-align: center">Referer</td>
<td style="text-align: left">先前网页的地址，当前请求网页紧随其后,即来路</td>
<td style="text-align: left">Referer: http://www.zcmhi.com/archives/71.html</td>
</tr>
<tr>
<td style="text-align: center">User-Agent</td>
<td style="text-align: left">User-Agent的内容包含发出请求的用户信息</td>
<td style="text-align: left">User-Agent: Mozilla/5.0 (Linux; X11)</td>
</tr>
</tbody>
</table>

<h3 id="toc_10">参考资料</h3>

<ol>
<li><a href="http://www.runoob.com/http/http-header-fields.html" target="_blank">HTTP 响应头信息 - 菜鸟教程</a></li>
<li><a href="https://kb.cnblogs.com/page/119118/" target="_blank">什么是 HTTP Headers？- GuYoung</a></li>
<li><a href="http://tools.jb51.net/table/http_header" target="_blank">HTTP响应头和请求头信息对照表</a></li>
</ol>

<h2 id="toc_11">5. Cookie</h2>

<p>很多网站在你浏览后，会在你的系统中留下一些小小的档案，也就是所谓的 Cookie。</p>

<p>存储 Cookie 是浏览器提供的功能。Cookie 其实是存储在浏览器中的纯文本，浏览器的安装目录下会专门有一个 cookie 文件夹来存放各个域下设置的 cookie。每当同一台计算机通过同一个浏览器请求某个页面时，就会发送这个 cookie，以作为用户身份的识别。</p>

<p>Cookie 在网站中的使用非常普遍，多数是出于提供个性化服务的需求。当然也存在一些网站为了广告投放和营销等目的滥用 Cookie。另外，也会有些网站通过 Cookie 来对非正常请求（比如爬虫）做限制。</p>

<h3 id="toc_12">常用属性</h3>

<table>
<thead>
<tr>
<th style="text-align: center">属性</th>
<th style="text-align: left">说明</th>
<th style="text-align: left">示例</th>
</tr>
</thead>

<tbody>
<tr>
<td style="text-align: center">expires</td>
<td style="text-align: left">cookie 失效时间</td>
<td style="text-align: left">expires=Tue, 25 Apr 2017 04:18:00 GMT</td>
</tr>
<tr>
<td style="text-align: center">domain</td>
<td style="text-align: left">限制访问的 cookie 域名</td>
<td style="text-align: left">domain=www.crossincode.com</td>
</tr>
<tr>
<td style="text-align: center">path</td>
<td style="text-align: left">限制访问的 cookie 路径</td>
<td style="text-align: left">path=/</td>
</tr>
<tr>
<td style="text-align: center">secure</td>
<td style="text-align: left">确保 cookie 只在 HTTPS 或其他安全协议时才会发送</td>
<td style="text-align: left">secure</td>
</tr>
<tr>
<td style="text-align: center">httpOnly</td>
<td style="text-align: left">限制 cookie 无法通过 js 访问</td>
<td style="text-align: left">httpOnly</td>
</tr>
</tbody>
</table>

<h3 id="toc_13">参考资料</h3>

<ol>
<li><a href="https://segmentfault.com/a/1190000004556040" target="_blank">聊一聊 cookie - ruoyiqing</a></li>
</ol>



<script type="text/javascript">
var _self="undefined"!=typeof window?window:"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?self:{},Prism=function(){var e=/\blang(?:uage)?-(\w+)\b/i,t=0,n=_self.Prism={util:{encode:function(e){return e instanceof a?new a(e.type,n.util.encode(e.content),e.alias):"Array"===n.util.type(e)?e.map(n.util.encode):e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/\u00a0/g," ")},type:function(e){return Object.prototype.toString.call(e).match(/\[object (\w+)\]/)[1]},objId:function(e){return e.__id||Object.defineProperty(e,"__id",{value:++t}),e.__id},clone:function(e){var t=n.util.type(e);switch(t){case"Object":var a={};for(var r in e)e.hasOwnProperty(r)&&(a[r]=n.util.clone(e[r]));return a;case"Array":return e.map&&e.map(function(e){return n.util.clone(e)})}return e}},languages:{extend:function(e,t){var a=n.util.clone(n.languages[e]);for(var r in t)a[r]=t[r];return a},insertBefore:function(e,t,a,r){r=r||n.languages;var l=r[e];if(2==arguments.length){a=arguments[1];for(var i in a)a.hasOwnProperty(i)&&(l[i]=a[i]);return l}var o={};for(var s in l)if(l.hasOwnProperty(s)){if(s==t)for(var i in a)a.hasOwnProperty(i)&&(o[i]=a[i]);o[s]=l[s]}return n.languages.DFS(n.languages,function(t,n){n===r[e]&&t!=e&&(this[t]=o)}),r[e]=o},DFS:function(e,t,a,r){r=r||{};for(var l in e)e.hasOwnProperty(l)&&(t.call(e,l,e[l],a||l),"Object"!==n.util.type(e[l])||r[n.util.objId(e[l])]?"Array"!==n.util.type(e[l])||r[n.util.objId(e[l])]||(r[n.util.objId(e[l])]=!0,n.languages.DFS(e[l],t,l,r)):(r[n.util.objId(e[l])]=!0,n.languages.DFS(e[l],t,null,r)))}},plugins:{},highlightAll:function(e,t){var a={callback:t,selector:'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'};n.hooks.run("before-highlightall",a);for(var r,l=a.elements||document.querySelectorAll(a.selector),i=0;r=l[i++];)n.highlightElement(r,e===!0,a.callback)},highlightElement:function(t,a,r){for(var l,i,o=t;o&&!e.test(o.className);)o=o.parentNode;o&&(l=(o.className.match(e)||[,""])[1],i=n.languages[l]),t.className=t.className.replace(e,"").replace(/\s+/g," ")+" language-"+l,o=t.parentNode,/pre/i.test(o.nodeName)&&(o.className=o.className.replace(e,"").replace(/\s+/g," ")+" language-"+l);var s=t.textContent,u={element:t,language:l,grammar:i,code:s};if(!s||!i)return n.hooks.run("complete",u),void 0;if(n.hooks.run("before-highlight",u),a&&_self.Worker){var c=new Worker(n.filename);c.onmessage=function(e){u.highlightedCode=e.data,n.hooks.run("before-insert",u),u.element.innerHTML=u.highlightedCode,r&&r.call(u.element),n.hooks.run("after-highlight",u),n.hooks.run("complete",u)},c.postMessage(JSON.stringify({language:u.language,code:u.code,immediateClose:!0}))}else u.highlightedCode=n.highlight(u.code,u.grammar,u.language),n.hooks.run("before-insert",u),u.element.innerHTML=u.highlightedCode,r&&r.call(t),n.hooks.run("after-highlight",u),n.hooks.run("complete",u)},highlight:function(e,t,r){var l=n.tokenize(e,t);return a.stringify(n.util.encode(l),r)},tokenize:function(e,t){var a=n.Token,r=[e],l=t.rest;if(l){for(var i in l)t[i]=l[i];delete t.rest}e:for(var i in t)if(t.hasOwnProperty(i)&&t[i]){var o=t[i];o="Array"===n.util.type(o)?o:[o];for(var s=0;s<o.length;++s){var u=o[s],c=u.inside,g=!!u.lookbehind,h=!!u.greedy,f=0,d=u.alias;u=u.pattern||u;for(var p=0;p<r.length;p++){var m=r[p];if(r.length>e.length)break e;if(!(m instanceof a)){u.lastIndex=0;var y=u.exec(m),v=1;if(!y&&h&&p!=r.length-1){var b=r[p+1].matchedStr||r[p+1],k=m+b;if(p<r.length-2&&(k+=r[p+2].matchedStr||r[p+2]),u.lastIndex=0,y=u.exec(k),!y)continue;var w=y.index+(g?y[1].length:0);if(w>=m.length)continue;var _=y.index+y[0].length,P=m.length+b.length;if(v=3,P>=_){if(r[p+1].greedy)continue;v=2,k=k.slice(0,P)}m=k}if(y){g&&(f=y[1].length);var w=y.index+f,y=y[0].slice(f),_=w+y.length,S=m.slice(0,w),O=m.slice(_),j=[p,v];S&&j.push(S);var A=new a(i,c?n.tokenize(y,c):y,d,y,h);j.push(A),O&&j.push(O),Array.prototype.splice.apply(r,j)}}}}}return r},hooks:{all:{},add:function(e,t){var a=n.hooks.all;a[e]=a[e]||[],a[e].push(t)},run:function(e,t){var a=n.hooks.all[e];if(a&&a.length)for(var r,l=0;r=a[l++];)r(t)}}},a=n.Token=function(e,t,n,a,r){this.type=e,this.content=t,this.alias=n,this.matchedStr=a||null,this.greedy=!!r};if(a.stringify=function(e,t,r){if("string"==typeof e)return e;if("Array"===n.util.type(e))return e.map(function(n){return a.stringify(n,t,e)}).join("");var l={type:e.type,content:a.stringify(e.content,t,r),tag:"span",classes:["token",e.type],attributes:{},language:t,parent:r};if("comment"==l.type&&(l.attributes.spellcheck="true"),e.alias){var i="Array"===n.util.type(e.alias)?e.alias:[e.alias];Array.prototype.push.apply(l.classes,i)}n.hooks.run("wrap",l);var o="";for(var s in l.attributes)o+=(o?" ":"")+s+'="'+(l.attributes[s]||"")+'"';return"<"+l.tag+' class="'+l.classes.join(" ")+'" '+o+">"+l.content+"</"+l.tag+">"},!_self.document)return _self.addEventListener?(_self.addEventListener("message",function(e){var t=JSON.parse(e.data),a=t.language,r=t.code,l=t.immediateClose;_self.postMessage(n.highlight(r,n.languages[a],a)),l&&_self.close()},!1),_self.Prism):_self.Prism;var r=document.currentScript||[].slice.call(document.getElementsByTagName("script")).pop();return r&&(n.filename=r.src,document.addEventListener&&!r.hasAttribute("data-manual")&&document.addEventListener("DOMContentLoaded",n.highlightAll)),_self.Prism}();"undefined"!=typeof module&&module.exports&&(module.exports=Prism),"undefined"!=typeof global&&(global.Prism=Prism);
</script>

<script type="text/javascript">
Prism.languages.markup={comment:/<!--[\w\W]*?-->/,prolog:/<\?[\w\W]+?\?>/,doctype:/<!DOCTYPE[\w\W]+?>/,cdata:/<!\[CDATA\[[\w\W]*?]]>/i,tag:{pattern:/<\/?(?!\d)[^\s>\/=.$<]+(?:\s+[^\s>\/=]+(?:=(?:("|')(?:\\\1|\\?(?!\1)[\w\W])*\1|[^\s'">=]+))?)*\s*\/?>/i,inside:{tag:{pattern:/^<\/?[^\s>\/]+/i,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"attr-value":{pattern:/=(?:('|")[\w\W]*?(\1)|[^\s>]+)/i,inside:{punctuation:/[=>"']/}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:/&#?[\da-z]{1,8};/i},Prism.hooks.add("wrap",function(a){"entity"===a.type&&(a.attributes.title=a.content.replace(/&amp;/,"&"))}),Prism.languages.xml=Prism.languages.markup,Prism.languages.html=Prism.languages.markup,Prism.languages.mathml=Prism.languages.markup,Prism.languages.svg=Prism.languages.markup;
</script>


</body>

</html>
